﻿using IterationLife.Domains.Sports.Dtos.MTDatas;

namespace IterationLife.Domains.Sports.Models
{
    /// <summary>
    /// 体育队伍
    /// </summary>
    public partial class SportTeam
    {
        public MTHistory GetJsonData()
        {
            if (string.IsNullOrWhiteSpace(this.HistoryAverageJsonData))
                return new MTHistory();
            return Util.Json.ToObject<MTHistory>(this.HistoryAverageJsonData);
        }

        public void SetJsonData(MTHistory history)
        {
            if (history == null)
                this.HistoryAverageJsonData = null;
            this.HistoryAverageJsonData = Util.Json.ToJson(history);
        }
    }
}